package com.base.common.core.utils;

import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.reflect.MethodSignature;

import java.lang.annotation.Annotation;

public class AopUtil {

    public static <T extends Annotation> T getMethodAnnotationWithJoinPoint(ProceedingJoinPoint proceedingJoinPoint, Class<T> clazz) {
        return ((MethodSignature) proceedingJoinPoint.getSignature()).getMethod().getAnnotation(clazz);
    }
}
